<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/','HomeController@showHome');
Route::get('/flush','HomeController@flush');
Route::get('/data','HomeController@getData');

Route::get('/feedback','FeedbackController@showIndex');
Route::post('/feedback','FeedbackController@sendFeedback');



// modify a (new) tab / page
Route::post('page/add', array('before' => 'csrf', 'uses' => 'PageController@addPage'));
Route::post('page/delete', array('before' => 'csrf', 'uses' => 'PageController@deletePage'));
Route::post('page/edit', array('before' => 'csrf', 'uses' => 'PageController@editPage'));
Route::post('page/sort', array('uses' => 'PageController@sortPage'));
Route::get('page/info', array('uses' => 'PageController@getInfo'));

// modify block
Route::post('block/add', array('before' => 'csrf', 'uses' => 'BlockController@addBlock'));
Route::post('block/delete', array('before' => 'csrf', 'uses' => 'BlockController@deleteBlock'));
Route::post('block/edit', array('before' => 'csrf', 'uses' => 'BlockController@editBlock'));
Route::get('block/info', array('uses' => 'BlockController@getInfo'));

// modify link
Route::post('link/add', array('before' => 'csrf', 'uses' => 'LinkController@addLink'));
Route::post('link/delete', array('before' => 'csrf', 'uses' => 'LinkController@deleteLink'));
Route::post('link/edit', array('before' => 'csrf', 'uses' => 'LinkController@editLink'));
Route::post('link/sort', array('uses' => 'LinkController@sortLink'));
Route::get('link/info', array('uses' => 'LinkController@getInfo'));

// drop a block
Route::post('block/drop', array('uses' => 'BlockController@drop'));

// quotes
Route::get('/quotes/get','QuoteController@getQuotes');